﻿using JinfuyuanProject.Entity;
using JinfuyuanProject.Repository;
using JinfuyuanProject.Repository.Interface;
using JinfuyuanProject.Service.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JinfuyuanProject.Service
{
    public class AttendanceService : IAttendanceService
    {
        private readonly IAttendanceRepository _attendanceRepository;

        public AttendanceService(IAttendanceRepository attendanceRepository)
        {
            _attendanceRepository = attendanceRepository;
        }
        public IQueryable<Attendance> GetList()
        {
            return _attendanceRepository.GetList();
        }
        public bool Delete(Attendance attendance)
        {
            return _attendanceRepository.Delete(attendance);
        }
        public Attendance GetModel(int Id)
        {
            return _attendanceRepository.GetModel(Id);

        }

        public int Insert(Attendance attendance)
        {
            return _attendanceRepository.Insert(attendance);
        }

        public bool Update(Attendance attendance)
        {
            return _attendanceRepository.Update(attendance);
        }
    }
}
